]> granicus.if.org Git - clang/commitdiff
CodeGen: ubsan is built static on windows, give handlers local storage
authorSaleem Abdulrasool <compnerd@compnerd.org>
Thu, 15 Dec 2016 16:30:20 +0000 (16:30 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Thu, 15 Dec 2016 16:30:20 +0000 (16:30 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289829 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGExpr.cpp

index 49308e25d715912188b5db2c92e06987b7394864..88a537467e2a4a666c14c5bb09b4ca2e5e41ce62 100644 (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();