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 | 49d26d2817180ccde605c987f79cd3a5b57639cd (patch) | |
tree | e300661d68dad6d9ccfb244cfa16a59be22944d9 /lib/CodeGen/CodeGenModule.cpp | |
parent | 5aeaca3fa755cddba583842e7a0c3e168bf71b4d (diff) |
Do the static-locals thing properly in the face of unions and
other things which might mess with the variable's type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153733 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index c9f1066032..4170c7bc30 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/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); } |