summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
authorAlp Toker <alp@nuanti.com>2014-06-05 22:10:59 +0000
committerAlp Toker <alp@nuanti.com>2014-06-05 22:10:59 +0000
commitfb8d02b179732b17897f1d4024583949a56b0bb5 (patch)
tree9773c072cdc1e0f4a6ccfba97f3ed6cda7f2d958 /clang/lib/CodeGen/CGBlocks.cpp
parent66f676e9e53aaaba12fd9848a94915346ab76b87 (diff)
downloadbcm5719-llvm-fb8d02b179732b17897f1d4024583949a56b0bb5.tar.gz
bcm5719-llvm-fb8d02b179732b17897f1d4024583949a56b0bb5.zip
Implement -Wframe-larger-than backend diagnostic
Add driver and frontend support for the GCC -Wframe-larger-than=bytes warning. This is the first GCC-compatible backend diagnostic built around LLVM's reporting feature. This commit adds infrastructure to perform reverse lookup from mangled names emitted after LLVM IR generation. We use that to resolve precise locations and originating AST functions, lambdas or block declarations to produce seamless codegen-guided diagnostics. An associated change, StringMap now maintains unique mangled name strings instead of allocating copies. This is a net memory saving in C++ and a small hit for C where we no longer reuse IdentifierInfo storage, pending further optimisation. llvm-svn: 210293
Diffstat (limited to 'clang/lib/CodeGen/CGBlocks.cpp')
-rw-r--r--clang/lib/CodeGen/CGBlocks.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp
index 71a2447cb5d..7ffebe28910 100644
--- a/clang/lib/CodeGen/CGBlocks.cpp
+++ b/clang/lib/CodeGen/CGBlocks.cpp
@@ -1127,7 +1127,7 @@ CodeGenFunction::GenerateBlockFunction(GlobalDecl GD,
llvm::FunctionType *fnLLVMType = CGM.getTypes().GetFunctionType(fnInfo);
- std::string name = CGM.getBlockMangledName(GD, blockDecl);
+ StringRef name = CGM.getBlockMangledName(GD, blockDecl);
llvm::Function *fn = llvm::Function::Create(
fnLLVMType, llvm::GlobalValue::InternalLinkage, name, &CGM.getModule());
CGM.SetInternalFunctionAttributes(blockDecl, fn, fnInfo);
OpenPOWER on IntegriCloud