summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-03-18 02:56:14 +0000
committerJohn McCall <rjmccall@apple.com>2011-03-18 02:56:14 +0000
commit7ef5cb3038fcbd4caa102d1ce9d70ae598985a7c (patch)
treecf12fb2284f5fc7e93e2cf14b6d186631d0cdad2 /clang/lib/CodeGen/CodeGenModule.cpp
parent7c9cc461651e1acb8c1c9c19141d8477c86c6976 (diff)
downloadbcm5719-llvm-7ef5cb3038fcbd4caa102d1ce9d70ae598985a7c.tar.gz
bcm5719-llvm-7ef5cb3038fcbd4caa102d1ce9d70ae598985a7c.zip
The Darwin kernel does not provide useful guard variable support.
Issue this as an IR-gen error; it's not really worthwhile doing this "right", i.e. in Sema, because IR gen knows a lot of tricks beyond what the constant evaluator knows. llvm-svn: 127854
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 61814702bdd..11e85870d14 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -154,6 +154,11 @@ bool CodeGenModule::isTargetDarwin() const {
return getContext().Target.getTriple().getOS() == llvm::Triple::Darwin;
}
+void CodeGenModule::Error(SourceLocation loc, llvm::StringRef error) {
+ unsigned diagID = getDiags().getCustomDiagID(Diagnostic::Error, error);
+ getDiags().Report(Context.getFullLoc(loc), diagID);
+}
+
/// ErrorUnsupported - Print out an error that codegen doesn't support the
/// specified stmt yet.
void CodeGenModule::ErrorUnsupported(const Stmt *S, const char *Type,
OpenPOWER on IntegriCloud