summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenAction.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-02-01 06:36:49 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-02-01 06:36:49 +0000
commita11b35a9b0583946780aa2e774f775362db33fdd (patch)
treeb7d3e05d45019521a97887e246e6e476bbdba30e /clang/lib/CodeGen/CodeGenAction.cpp
parentc3c9ee562368b5d686d21b6a702c89e69aae6a36 (diff)
downloadbcm5719-llvm-a11b35a9b0583946780aa2e774f775362db33fdd.tar.gz
bcm5719-llvm-a11b35a9b0583946780aa2e774f775362db33fdd.zip
Revert r149363 which was part a series of commits that were reverted in llvm
commit 149470. This fixes test/CodeGen/PR3589-freestanding-libcalls.c. Original log: ConstantArray::get() (for strings) is going away, use ConstantDataArray::getString instead. Many instances of ConstantArray::get() could be moved to use more efficient ConstantDataArray methods that avoid a ton of intermediate Constant*'s for each element (e.g. GetConstantArrayFromStringLiteral). I don't plan on doing this in the short-term though. llvm-svn: 149477
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenAction.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp
index 2ac9a6fddfb..eedfc57a106 100644
--- a/clang/lib/CodeGen/CodeGenAction.cpp
+++ b/clang/lib/CodeGen/CodeGenAction.cpp
@@ -220,15 +220,18 @@ void BackendConsumer::InlineAsmDiagHandler2(const llvm::SMDiagnostic &D,
SourceLocation LocCookie) {
// There are a couple of different kinds of errors we could get here. First,
// we re-format the SMDiagnostic in terms of a clang diagnostic.
+
+ // Strip "error: " off the start of the message string.
StringRef Message = D.getMessage();
+ if (Message.startswith("error: "))
+ Message = Message.substr(7);
// If the SMDiagnostic has an inline asm source location, translate it.
FullSourceLoc Loc;
if (D.getLoc() != SMLoc())
Loc = ConvertBackendLocation(D, Context->getSourceManager());
-
- // FIXME: Propagate ranges up as well.
+
// If this problem has clang-level source location information, report the
// issue as being an error in the source with a note showing the instantiated
// code.
OpenPOWER on IntegriCloud