diff options
author | John McCall <rjmccall@apple.com> | 2012-03-30 07:09:50 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2012-03-30 07:09:50 +0000 |
commit | 87590e60c088355ed0227da12f0ca04928b1e28f (patch) | |
tree | c32befa3a8dbd26e95c4cdd3ec2092c569215b23 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 74c17c65e4f3627baa993ea621f22b1197559381 (diff) | |
download | bcm5719-llvm-87590e60c088355ed0227da12f0ca04928b1e28f.tar.gz bcm5719-llvm-87590e60c088355ed0227da12f0ca04928b1e28f.zip |
Do the static-locals thing properly in the face of unions and
other things which might mess with the variable's type.
llvm-svn: 153733
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index c9f1066032d..4170c7bc307 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -197,8 +197,9 @@ bool CodeGenModule::isTargetDarwin() const { return getContext().getTargetInfo().getTriple().isOSDarwin(); } -void CodeGenModule::Error(SourceLocation loc, StringRef error) { - unsigned diagID = getDiags().getCustomDiagID(DiagnosticsEngine::Error, error); +void CodeGenModule::Error(SourceLocation loc, const Twine &error) { + unsigned diagID = getDiags().getCustomDiagID(DiagnosticsEngine::Error, + error.str()); getDiags().Report(Context.getFullLoc(loc), diagID); } |