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
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 6181470..11e8587 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -154,6 +154,11 @@
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,