[PATCH] D78117: [AVR] Define __ELF__

Ayke via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 14 15:47:14 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGfe06e231ff15: [AVR] Define __ELF__ (authored by aykevl).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78117/new/

https://reviews.llvm.org/D78117

Files:
  clang/lib/Basic/Targets/AVR.cpp
  clang/test/CodeGen/avr/target-cpu-defines/atmega328p.c
  clang/test/CodeGen/avr/target-cpu-defines/attiny104.c
  clang/test/CodeGen/avr/target-cpu-defines/common.c


Index: clang/test/CodeGen/avr/target-cpu-defines/common.c
===================================================================
--- clang/test/CodeGen/avr/target-cpu-defines/common.c
+++ clang/test/CodeGen/avr/target-cpu-defines/common.c
@@ -4,3 +4,4 @@
 // CHECK: #define AVR 1
 // CHECK: #define __AVR 1
 // CHECK: #define __AVR__ 1
+// CHECK: #define __ELF__ 1
Index: clang/test/CodeGen/avr/target-cpu-defines/attiny104.c
===================================================================
--- clang/test/CodeGen/avr/target-cpu-defines/attiny104.c
+++ clang/test/CodeGen/avr/target-cpu-defines/attiny104.c
@@ -5,3 +5,4 @@
 // CHECK: #define __AVR 1
 // CHECK: #define __AVR_ATtiny104__ 1
 // CHECK: #define __AVR__ 1
+// CHECK: #define __ELF__ 1
Index: clang/test/CodeGen/avr/target-cpu-defines/atmega328p.c
===================================================================
--- clang/test/CodeGen/avr/target-cpu-defines/atmega328p.c
+++ clang/test/CodeGen/avr/target-cpu-defines/atmega328p.c
@@ -5,3 +5,4 @@
 // CHECK: #define __AVR 1
 // CHECK: #define __AVR_ATmega328P__ 1
 // CHECK: #define __AVR__ 1
+// CHECK: #define __ELF__ 1
Index: clang/lib/Basic/Targets/AVR.cpp
===================================================================
--- clang/lib/Basic/Targets/AVR.cpp
+++ clang/lib/Basic/Targets/AVR.cpp
@@ -300,6 +300,7 @@
   Builder.defineMacro("AVR");
   Builder.defineMacro("__AVR");
   Builder.defineMacro("__AVR__");
+  Builder.defineMacro("__ELF__");
 
   if (!this->CPU.empty()) {
     auto It = llvm::find_if(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78117.257535.patch
Type: text/x-patch
Size: 1530 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200414/d8996b50/attachment.bin>


More information about the cfe-commits mailing list