[llvm-commits] [llvm] r133638 - in /llvm/trunk/lib/Target/ARM: ARM.h ARMAsmBackend.cpp ARMMachObjectWriter.cpp CMakeLists.txt
Jim Grosbach
grosbach at apple.com
Wed Jun 22 13:47:06 PDT 2011
Huh. Must be a difference in underlying headers on my system or something. Sorry for the breakage. Fixed in 133640.
-Jim
On Jun 22, 2011, at 1:40 PM, Nick Lewycky wrote:
> Hi Jim,
>
> ARMMachObjectWriter is missing #include "llvm/Support/DataTypes.h" for uint32_t!
>
> llvm[3]: Compiling ARMISelDAGToDAG.cpp for Debug+Asserts build
> In file included from ARMAsmBackend.cpp:10:
> ARM.h:65: error: ‘uint32_t’ has not been declared
> ARM.h:66: error: ‘uint32_t’ has not been declared
> In file included from ARMBaseRegisterInfo.cpp:14:
> ARM.h:65: error: ‘uint32_t’ has not been declared
> ARM.h:66: error: ‘uint32_t’ has not been declared
> In file included from ARMExpandPseudoInsts.cpp:18:
> ARM.h:65: error: ‘uint32_t’ has not been declared
> ARM.h:66: error: ‘uint32_t’ has not been declared
> In file included from ARMConstantIslandPass.cpp:17:
> ARM.h:65: error: ‘uint32_t’ has not been declared
> ARM.h:66: error: ‘uint32_t’ has not been declared
> [...]
>
> Nick
>
> On 22 June 2011 13:14, Jim Grosbach <grosbach at apple.com> wrote:
> Author: grosbach
> Date: Wed Jun 22 15:14:52 2011
> New Revision: 133638
>
> URL: http://llvm.org/viewvc/llvm-project?rev=133638&view=rev
> Log:
> Move ARMMachObjectWriter to its own file.
>
> Just tidy up a bit. No functional change.
>
> Added:
> llvm/trunk/lib/Target/ARM/ARMMachObjectWriter.cpp
> Modified:
> llvm/trunk/lib/Target/ARM/ARM.h
> llvm/trunk/lib/Target/ARM/ARMAsmBackend.cpp
> llvm/trunk/lib/Target/ARM/CMakeLists.txt
>
> Modified: llvm/trunk/lib/Target/ARM/ARM.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARM.h?rev=133638&r1=133637&r2=133638&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/ARM.h (original)
> +++ llvm/trunk/lib/Target/ARM/ARM.h Wed Jun 22 15:14:52 2011
> @@ -27,6 +27,7 @@
> class JITCodeEmitter;
> class formatted_raw_ostream;
> class MCCodeEmitter;
> +class MCObjectWriter;
> class TargetAsmBackend;
> class MachineInstr;
> class ARMAsmPrinter;
> @@ -58,6 +59,12 @@
> void LowerARMMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI,
> ARMAsmPrinter &AP);
>
> +/// createARMMachObjectWriter - Construct an ARM Mach-O object writer.
> +MCObjectWriter *createARMMachObjectWriter(raw_ostream &OS,
> + bool Is64Bit,
> + uint32_t CPUType,
> + uint32_t CPUSubtype);
> +
> } // end namespace llvm;
>
> #endif
>
> Modified: llvm/trunk/lib/Target/ARM/ARMAsmBackend.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMAsmBackend.cpp?rev=133638&r1=133637&r2=133638&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/ARMAsmBackend.cpp (original)
> +++ llvm/trunk/lib/Target/ARM/ARMAsmBackend.cpp Wed Jun 22 15:14:52 2011
> @@ -28,14 +28,6 @@
> using namespace llvm;
>
> namespace {
> -class ARMMachObjectWriter : public MCMachObjectTargetWriter {
> -public:
> - ARMMachObjectWriter(bool Is64Bit, uint32_t CPUType,
> - uint32_t CPUSubtype)
> - : MCMachObjectTargetWriter(Is64Bit, CPUType, CPUSubtype,
> - /*UseAggressiveSymbolFolding=*/true) {}
> -};
> -
> class ARMELFObjectWriter : public MCELFObjectTargetWriter {
> public:
> ARMELFObjectWriter(Triple::OSType OSType)
> @@ -423,12 +415,9 @@
> : ARMAsmBackend(T), Subtype(st) { }
>
> MCObjectWriter *createObjectWriter(raw_ostream &OS) const {
> - return createMachObjectWriter(new ARMMachObjectWriter(
> - /*Is64Bit=*/false,
> - object::mach::CTM_ARM,
> - Subtype),
> - OS,
> - /*IsLittleEndian=*/true);
> + return createARMMachObjectWriter(OS, /*Is64Bit=*/false,
> + object::mach::CTM_ARM,
> + Subtype);
> }
>
> void ApplyFixup(const MCFixup &Fixup, char *Data, unsigned DataSize,
>
> Added: llvm/trunk/lib/Target/ARM/ARMMachObjectWriter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMMachObjectWriter.cpp?rev=133638&view=auto
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/ARMMachObjectWriter.cpp (added)
> +++ llvm/trunk/lib/Target/ARM/ARMMachObjectWriter.cpp Wed Jun 22 15:14:52 2011
> @@ -0,0 +1,32 @@
> +//===-- ARMMachObjectWriter.cpp - ARM Mach Object Writer ------------------===//
> +//
> +// The LLVM Compiler Infrastructure
> +//
> +// This file is distributed under the University of Illinois Open Source
> +// License. See LICENSE.TXT for details.
> +//
> +//===----------------------------------------------------------------------===//
> +
> +#include "ARM.h"
> +#include "llvm/MC/MCMachObjectWriter.h"
> +using namespace llvm;
> +
> +namespace {
> +class ARMMachObjectWriter : public MCMachObjectTargetWriter {
> +public:
> + ARMMachObjectWriter(bool Is64Bit, uint32_t CPUType,
> + uint32_t CPUSubtype)
> + : MCMachObjectTargetWriter(Is64Bit, CPUType, CPUSubtype,
> + /*UseAggressiveSymbolFolding=*/true) {}
> +};
> +}
> +
> +MCObjectWriter *llvm::createARMMachObjectWriter(raw_ostream &OS,
> + bool Is64Bit,
> + uint32_t CPUType,
> + uint32_t CPUSubtype) {
> + return createMachObjectWriter(new ARMMachObjectWriter(Is64Bit,
> + CPUType,
> + CPUSubtype),
> + OS, /*IsLittleEndian=*/true);
> +}
>
> Modified: llvm/trunk/lib/Target/ARM/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/CMakeLists.txt?rev=133638&r1=133637&r2=133638&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/CMakeLists.txt (original)
> +++ llvm/trunk/lib/Target/ARM/CMakeLists.txt Wed Jun 22 15:14:52 2011
> @@ -34,6 +34,7 @@
> ARMISelLowering.cpp
> ARMInstrInfo.cpp
> ARMJITInfo.cpp
> + ARMMachObjectWriter.cpp
> ARMMCCodeEmitter.cpp
> ARMMCExpr.cpp
> ARMLoadStoreOptimizer.cpp
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list