summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-03-30 19:44:53 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-03-30 19:44:53 +0000
commit8453795255ca34a804e01f5b3c7cb939f41ad20c (patch)
tree995276152663add165145dc07f06cae95bc0f1eb /clang/lib/CodeGen/CodeGenModule.cpp
parentdaa04130ed75e5c42a99bac91ac22306f9af8987 (diff)
downloadbcm5719-llvm-8453795255ca34a804e01f5b3c7cb939f41ad20c.tar.gz
bcm5719-llvm-8453795255ca34a804e01f5b3c7cb939f41ad20c.zip
Revert r153723, and its follow-ups r153728 and r153733.
These patches cause us to miscompile and/or reject code with static function-local variables in an extern-C context. Previously, we were papering over this as long as the variables are within the same translation unit, and had not seen any failures in the wild. We still need a proper fix, which involves mangling static locals inside of an extern-C block (as GCC already does), but this patch causes pretty widespread regressions. Firefox, and many other applications no longer build. Lots of test cases have been posted to the list in response to this commit, so there should be no problem reproducing the issues. llvm-svn: 153768
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 4170c7bc307..c9f1066032d 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -197,9 +197,8 @@ bool CodeGenModule::isTargetDarwin() const {
return getContext().getTargetInfo().getTriple().isOSDarwin();
}
-void CodeGenModule::Error(SourceLocation loc, const Twine &error) {
- unsigned diagID = getDiags().getCustomDiagID(DiagnosticsEngine::Error,
- error.str());
+void CodeGenModule::Error(SourceLocation loc, StringRef error) {
+ unsigned diagID = getDiags().getCustomDiagID(DiagnosticsEngine::Error, error);
getDiags().Report(Context.getFullLoc(loc), diagID);
}
OpenPOWER on IntegriCloud