[llvm] r270298 - [AVR] Fix header files in MCTargetDesc
Dylan McKay via llvm-commits
llvm-commits at lists.llvm.org
Fri May 20 17:35:07 PDT 2016
Author: dylanmckay
Date: Fri May 20 19:35:07 2016
New Revision: 270298
URL: http://llvm.org/viewvc/llvm-project?rev=270298&view=rev
Log:
[AVR] Fix header files in MCTargetDesc
Everything now compiles successfully, but there are still undefined
references.
Added:
llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRTargetStreamer.cpp
Modified:
llvm/trunk/lib/Target/AVR/CMakeLists.txt
llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRELFStreamer.cpp
llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRELFStreamer.h
llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRTargetStreamer.h
llvm/trunk/lib/Target/AVR/MCTargetDesc/CMakeLists.txt
Modified: llvm/trunk/lib/Target/AVR/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AVR/CMakeLists.txt?rev=270298&r1=270297&r2=270298&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AVR/CMakeLists.txt (original)
+++ llvm/trunk/lib/Target/AVR/CMakeLists.txt Fri May 20 19:35:07 2016
@@ -16,5 +16,6 @@ add_llvm_target(AVRCodeGen
add_dependencies(LLVMAVRCodeGen intrinsics_gen)
+add_subdirectory(MCTargetDesc)
add_subdirectory(TargetInfo)
Modified: llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRELFStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRELFStreamer.cpp?rev=270298&r1=270297&r2=270298&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRELFStreamer.cpp (original)
+++ llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRELFStreamer.cpp Fri May 20 19:35:07 2016
@@ -3,6 +3,10 @@
#include "llvm/Support/ELF.h"
#include "llvm/Support/FormattedStream.h"
+#include "AVRMCTargetDesc.h"
+
+namespace llvm {
+
static unsigned getEFlagsForFeatureSet(const FeatureBitset &Features) {
unsigned EFlags = 0;
@@ -52,9 +56,11 @@ AVRELFStreamer::AVRELFStreamer(MCStreame
: AVRTargetStreamer(S) {
MCAssembler &MCA = getStreamer().getAssembler();
- unsigned EFlags = MCA.getELFHeaderEFlags(Features);
+ unsigned EFlags = MCA.getELFHeaderEFlags();
- EFlags |= getEFlagsForFeatureSet(STI.getFeatureBits())
+ EFlags |= getEFlagsForFeatureSet(STI.getFeatureBits());
MCA.setELFHeaderEFlags(EFlags);
}
+
+} // end namespace llvm
Modified: llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRELFStreamer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRELFStreamer.h?rev=270298&r1=270297&r2=270298&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRELFStreamer.h (original)
+++ llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRELFStreamer.h Fri May 20 19:35:07 2016
@@ -12,7 +12,7 @@
#include "AVRTargetStreamer.h"
-#include "llvm/MC/MCELFStreamer.h"
+namespace llvm {
/// A target streamer for an AVR ELF object file.
class AVRELFStreamer : public AVRTargetStreamer {
@@ -24,4 +24,6 @@ public:
}
};
+} // end namespace llvm
+
#endif
Added: llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRTargetStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRTargetStreamer.cpp?rev=270298&view=auto
==============================================================================
--- llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRTargetStreamer.cpp (added)
+++ llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRTargetStreamer.cpp Fri May 20 19:35:07 2016
@@ -0,0 +1,24 @@
+//===-- AVRTargetStreamer.cpp - AVR Target Streamer Methods ---------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file provides AVR specific target streamer methods.
+//
+//===----------------------------------------------------------------------===//
+
+#include "AVRTargetStreamer.h"
+
+namespace llvm {
+
+AVRTargetStreamer::AVRTargetStreamer(MCStreamer &S) : MCTargetStreamer(S) {}
+
+AVRTargetAsmStreamer::AVRTargetAsmStreamer(MCStreamer &S)
+ : AVRTargetStreamer(S) {}
+
+} // end namespace llvm
+
Modified: llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRTargetStreamer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRTargetStreamer.h?rev=270298&r1=270297&r2=270298&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRTargetStreamer.h (original)
+++ llvm/trunk/lib/Target/AVR/MCTargetDesc/AVRTargetStreamer.h Fri May 20 19:35:07 2016
@@ -10,6 +10,8 @@
#ifndef LLVM_AVR_TARGET_STREAMER_H
#define LLVM_AVR_TARGET_STREAMER_H
+#include "llvm/MC/MCELFStreamer.h"
+
namespace llvm {
class MCStreamer;
Modified: llvm/trunk/lib/Target/AVR/MCTargetDesc/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AVR/MCTargetDesc/CMakeLists.txt?rev=270298&r1=270297&r2=270298&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AVR/MCTargetDesc/CMakeLists.txt (original)
+++ llvm/trunk/lib/Target/AVR/MCTargetDesc/CMakeLists.txt Fri May 20 19:35:07 2016
@@ -1,6 +1,6 @@
add_llvm_library(LLVMAVRDesc
- AVRTargetStreamer.cpp
AVRELFStreamer.cpp
+ AVRTargetStreamer.cpp
)
add_dependencies(LLVMAVRDesc AVRCommonTableGen)
More information about the llvm-commits
mailing list