From 87590e60c088355ed0227da12f0ca04928b1e28f Mon Sep 17 00:00:00 2001 From: John McCall Date: Fri, 30 Mar 2012 07:09:50 +0000 Subject: 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 --- clang/lib/CodeGen/CodeGenModule.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index c9f1066..4170c7b 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); } -- cgit v1.1