From: Saleem Abdulrasool Date: Thu, 15 Dec 2016 16:30:20 +0000 (+0000) Subject: CodeGen: ubsan is built static on windows, give handlers local storage X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b4a24525d740b9ef9b02f91ba6b174b1083604ea;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289829 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 49308e25d7..88a537467e 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -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();