aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--lib/CodeGen/CodeGenModule.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index d7d732997b..3e146215f4 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -106,11 +106,9 @@ void CodeGenModule::ErrorUnsupported(const Stmt *S, const char *Type,
return;
unsigned DiagID = getDiags().getCustomDiagID(Diagnostic::Error,
"cannot codegen this %0 yet");
- SourceRange Range = S->getSourceRange();
std::string Msg = Type;
- const std::string *Strs[] = { &Msg };
- getDiags().Report(Context.getFullLoc(S->getLocStart()), DiagID,
- Strs, 1, &Range, 1);
+ getDiags().Report(Context.getFullLoc(S->getLocStart()), DiagID)
+ << Msg << S->getSourceRange();
}
/// ErrorUnsupported - Print out an error that codegen doesn't support the
@@ -122,8 +120,7 @@ void CodeGenModule::ErrorUnsupported(const Decl *D, const char *Type,
unsigned DiagID = getDiags().getCustomDiagID(Diagnostic::Error,
"cannot codegen this %0 yet");
std::string Msg = Type;
- const std::string *Strs[] = { &Msg };
- getDiags().Report(Context.getFullLoc(D->getLocation()), DiagID, Strs, 1);
+ getDiags().Report(Context.getFullLoc(D->getLocation()), DiagID) << Msg;
}
/// setGlobalVisibility - Set the visibility for the given LLVM