CodeGen: ubsan is built static on windows, give handlers local storage

The UBSAN runtime is built static on Windows.  This requires that we give local
storage always.  This impacts Windows where the linker would otherwise have to
generate a thunk to access the symbol via the IAT.  This should repair the
windows clang build bots.

llvm-svn: 289829
This commit is contained in:
Saleem Abdulrasool 2016-12-15 16:30:20 +00:00
parent cf17674211
commit 05b8fde8ee
1 changed files with 2 additions and 1 deletions

View File

@ -2545,7 +2545,8 @@ static void emitCheckHandlerCall(CodeGenFunction &CGF,
llvm::Value *Fn = CGF.CGM.CreateRuntimeFunction(
FnType, FnName,
llvm::AttributeSet::get(CGF.getLLVMContext(),
llvm::AttributeSet::FunctionIndex, B));
llvm::AttributeSet::FunctionIndex, B),
/*Local=*/true);
llvm::CallInst *HandlerCall = CGF.EmitNounwindRuntimeCall(Fn, FnArgs);
if (!MayReturn) {
HandlerCall->setDoesNotReturn();