summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2014-12-03 02:08:51 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2014-12-03 02:08:51 +0000
commit1a0a9a3c75a9c24b23c01a3920378890c1995b11 (patch)
tree98afeb70e10ab053a58075f3235bc349a390cb13 /clang/lib/CodeGen
parent51d2de7b9edfb8e5aad0c533c249b16989a9af41 (diff)
downloadbcm5719-llvm-1a0a9a3c75a9c24b23c01a3920378890c1995b11.tar.gz
bcm5719-llvm-1a0a9a3c75a9c24b23c01a3920378890c1995b11.zip
UBSan now uses prologue data instead of prefix data
As the semantics of prefix data has changed. See D6454. Patch by Ben Gamari! Test Plan: Testsuite Differential Revision: http://reviews.llvm.org/D6489 llvm-svn: 223190
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index 05c98fce0b8..4291b148930 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -603,17 +603,17 @@ void CodeGenFunction::StartFunction(GlobalDecl GD,
}
// If we are checking function types, emit a function type signature as
- // prefix data.
+ // prologue data.
if (getLangOpts().CPlusPlus && SanOpts.has(SanitizerKind::Function)) {
if (const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(D)) {
- if (llvm::Constant *PrefixSig =
+ if (llvm::Constant *PrologueSig =
CGM.getTargetCodeGenInfo().getUBSanFunctionSignature(CGM)) {
llvm::Constant *FTRTTIConst =
CGM.GetAddrOfRTTIDescriptor(FD->getType(), /*ForEH=*/true);
- llvm::Constant *PrefixStructElems[] = { PrefixSig, FTRTTIConst };
- llvm::Constant *PrefixStructConst =
- llvm::ConstantStruct::getAnon(PrefixStructElems, /*Packed=*/true);
- Fn->setPrefixData(PrefixStructConst);
+ llvm::Constant *PrologueStructElems[] = { PrologueSig, FTRTTIConst };
+ llvm::Constant *PrologueStructConst =
+ llvm::ConstantStruct::getAnon(PrologueStructElems, /*Packed=*/true);
+ Fn->setPrologueData(PrologueStructConst);
}
}
}
OpenPOWER on IntegriCloud