[llvm] r201359 - Fix generation of 'isa' and 'discriminator' keywords.
Diego Novillo
dnovillo at google.com
Thu Feb 13 12:05:03 PST 2014
Author: dnovillo
Date: Thu Feb 13 14:05:03 2014
New Revision: 201359
URL: http://llvm.org/viewvc/llvm-project?rev=201359&view=rev
Log:
Fix generation of 'isa' and 'discriminator' keywords.
Summary:
There should be a space before each of these two keywords to avoid
generating invalid assembly files.
NOTE: I could not find an obvious maintainers in CODE_OWNERS.TXT, but
this seems related to debug info.
Reviewers: echristo
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2791
Modified:
llvm/trunk/lib/MC/MCAsmStreamer.cpp
llvm/trunk/test/MC/AsmParser/directive_loc.s
Modified: llvm/trunk/lib/MC/MCAsmStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmStreamer.cpp?rev=201359&r1=201358&r2=201359&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAsmStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmStreamer.cpp Thu Feb 13 14:05:03 2014
@@ -902,9 +902,9 @@ void MCAsmStreamer::EmitDwarfLocDirectiv
}
if (Isa)
- OS << "isa " << Isa;
+ OS << " isa " << Isa;
if (Discriminator)
- OS << "discriminator " << Discriminator;
+ OS << " discriminator " << Discriminator;
if (IsVerboseAsm) {
OS.PadToColumn(MAI->getCommentColumn());
Modified: llvm/trunk/test/MC/AsmParser/directive_loc.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/AsmParser/directive_loc.s?rev=201359&r1=201358&r2=201359&view=diff
==============================================================================
--- llvm/trunk/test/MC/AsmParser/directive_loc.s (original)
+++ llvm/trunk/test/MC/AsmParser/directive_loc.s Thu Feb 13 14:05:03 2014
@@ -1,9 +1,18 @@
-# RUN: llvm-mc -triple i386-unknown-unknown %s
-# FIXME: Actually test the output.
+# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s -check-prefix=FILE
+# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s -check-prefix=BASIC-LOC-1
+# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s -check-prefix=BASIC-LOC-2
+# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s -check-prefix=DISCRIMINATOR
+# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s -check-prefix=ISA
.file 1 "hello"
+# FILE: .file 1 "hello"
.loc 1
.loc 1 2
+# BASIC-LOC-1: .loc 1 2 0
.loc 1 2 3
+# BASIC-LOC-2: .loc 1 2 3
.loc 1 2 discriminator 1
+# DISCRIMINATOR: 1 2 0 discriminator 1
+ .loc 1 2 0 isa 3
+# ISA: 1 2 0 isa 3
.loc 1 0
More information about the llvm-commits
mailing list