summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 70c092f)
raw | patch | inline | side by side (parent: 70c092f)
author | Saleem Abdulrasool <compnerd@compnerd.org> | |
Sun, 19 Jan 2014 08:25:41 +0000 (08:25 +0000) | ||
committer | Saleem Abdulrasool <compnerd@compnerd.org> | |
Sun, 19 Jan 2014 08:25:41 +0000 (08:25 +0000) |
Ensure that the tag types are reflected on a replacement. This is particularly
important for the compatibility tag which has multiple representations where the
last definition wins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199577 91177308-0d34-0410-b5e6-96231b3b80d8
important for the compatibility tag which has multiple representations where the
last definition wins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199577 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp | patch | blob | history | |
test/MC/ARM/directive-eabi_attribute-overwrite.s | [new file with mode: 0644] | patch | blob |
diff --git a/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp b/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp
index 1e3dc617447cacdfe72583875812fd9443e33476..4c079262943ac899b39fc295fb4edb205467ad25 100644 (file)
if (AttributeItem *Item = getAttributeItem(Attribute)) {
if (!OverwriteExisting)
return;
+ Item->Type = AttributeItem::NumericAttribute;
Item->IntValue = Value;
return;
}
if (AttributeItem *Item = getAttributeItem(Attribute)) {
if (!OverwriteExisting)
return;
+ Item->Type = AttributeItem::TextAttribute;
Item->StringValue = Value;
return;
}
if (AttributeItem *Item = getAttributeItem(Attribute)) {
if (!OverwriteExisting)
return;
+ Item->Type = AttributeItem::NumericAndTextAttributes;
Item->IntValue = IntValue;
Item->StringValue = StringValue;
return;
diff --git a/test/MC/ARM/directive-eabi_attribute-overwrite.s b/test/MC/ARM/directive-eabi_attribute-overwrite.s
--- /dev/null
@@ -0,0 +1,18 @@
+@ RUN: llvm-mc -triple armv7-eabi -filetype obj -o - %s | llvm-readobj -s -sd \
+@ RUN: | FileCheck %s
+
+ .syntax unified
+ .thumb
+
+ .eabi_attribute Tag_compatibility, 1
+ .eabi_attribute Tag_compatibility, 1, "aeabi"
+
+@ CHECK: Section {
+@ CHECK: Name: .ARM.attributes
+@ CHECK: Type: SHT_ARM_ATTRIBUTES
+@ CHECK: SectionData (
+@ CHECK: 0000: 41170000 00616561 62690001 0D000000
+@ CHECK: 0010: 20014145 41424900
+@ CHECK: )
+@ CHECK: }
+