From 74b3c8da4800c7e8ba8f019879db29738ecc5f74 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Fri, 15 Feb 2013 12:30:38 +0000 Subject: [PATCH] Make helpers static. Add missing include so LLVMInitializeObjCARCOpts gets C linkage. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175264 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/ARMException.cpp | 2 +- lib/DebugInfo/DWARFDebugFrame.cpp | 3 ++- lib/MC/MCObjectStreamer.cpp | 2 +- lib/Support/SourceMgr.cpp | 4 ++-- lib/TableGen/Record.cpp | 8 +++----- lib/Target/X86/X86RegisterInfo.cpp | 2 +- lib/Transforms/ObjCARC/ObjCARC.cpp | 1 + 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/CodeGen/AsmPrinter/ARMException.cpp b/lib/CodeGen/AsmPrinter/ARMException.cpp index 93100691c84..188047d94f4 100644 --- a/lib/CodeGen/AsmPrinter/ARMException.cpp +++ b/lib/CodeGen/AsmPrinter/ARMException.cpp @@ -36,7 +36,7 @@ #include "llvm/Target/TargetRegisterInfo.h" using namespace llvm; -cl::opt +static cl::opt EnableARMEHABIDescriptors("arm-enable-ehabi-descriptors", cl::Hidden, cl::desc("Generate ARM EHABI tables with unwinding descriptors"), cl::init(false)); diff --git a/lib/DebugInfo/DWARFDebugFrame.cpp b/lib/DebugInfo/DWARFDebugFrame.cpp index 9da304d31f8..69e3a3a62fc 100644 --- a/lib/DebugInfo/DWARFDebugFrame.cpp +++ b/lib/DebugInfo/DWARFDebugFrame.cpp @@ -46,7 +46,7 @@ protected: uint64_t Length; }; - +namespace { /// \brief DWARF Common Information Entry (CIE) class CIE : public FrameEntry { public: @@ -128,6 +128,7 @@ private: uint64_t AddressRange; CIE *LinkedCIE; }; +} // end anonymous namespace DWARFDebugFrame::DWARFDebugFrame() { diff --git a/lib/MC/MCObjectStreamer.cpp b/lib/MC/MCObjectStreamer.cpp index 5aa4b40a6dd..fe435061eb4 100644 --- a/lib/MC/MCObjectStreamer.cpp +++ b/lib/MC/MCObjectStreamer.cpp @@ -224,7 +224,7 @@ void MCObjectStreamer::EmitInstToFragment(const MCInst &Inst) { IF->getContents().append(Code.begin(), Code.end()); } -const char *BundlingNotImplementedMsg = +static const char *BundlingNotImplementedMsg = "Aligned bundling is not implemented for this object format"; void MCObjectStreamer::EmitBundleAlignMode(unsigned AlignPow2) { diff --git a/lib/Support/SourceMgr.cpp b/lib/Support/SourceMgr.cpp index fa82265f380..fac3cad5cc2 100644 --- a/lib/Support/SourceMgr.cpp +++ b/lib/Support/SourceMgr.cpp @@ -248,8 +248,8 @@ SMDiagnostic::SMDiagnostic(const SourceMgr &sm, SMLoc L, StringRef FN, std::sort(FixIts.begin(), FixIts.end()); } -void buildFixItLine(std::string &CaretLine, std::string &FixItLine, - ArrayRef FixIts, ArrayRef SourceLine) { +static void buildFixItLine(std::string &CaretLine, std::string &FixItLine, + ArrayRef FixIts, ArrayRef SourceLine){ if (FixIts.empty()) return; diff --git a/lib/TableGen/Record.cpp b/lib/TableGen/Record.cpp index fcee93aac47..9ad20532d7e 100644 --- a/lib/TableGen/Record.cpp +++ b/lib/TableGen/Record.cpp @@ -1525,11 +1525,9 @@ Init *FieldInit::resolveReferences(Record &R, const RecordVal *RV) const { return const_cast(this); } -void ProfileDagInit(FoldingSetNodeID &ID, - Init *V, - const std::string &VN, - ArrayRef ArgRange, - ArrayRef NameRange) { +static void ProfileDagInit(FoldingSetNodeID &ID, Init *V, const std::string &VN, + ArrayRef ArgRange, + ArrayRef NameRange) { ID.AddPointer(V); ID.AddString(VN); diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp index 02da1409165..401eefb16af 100644 --- a/lib/Target/X86/X86RegisterInfo.cpp +++ b/lib/Target/X86/X86RegisterInfo.cpp @@ -50,7 +50,7 @@ ForceStackAlign("force-align-stack", " needed for the function."), cl::init(false), cl::Hidden); -cl::opt +static cl::opt EnableBasePointer("x86-use-base-pointer", cl::Hidden, cl::init(true), cl::desc("Enable use of a base pointer for complex stack frames")); diff --git a/lib/Transforms/ObjCARC/ObjCARC.cpp b/lib/Transforms/ObjCARC/ObjCARC.cpp index f798063bb39..53a31b0de17 100644 --- a/lib/Transforms/ObjCARC/ObjCARC.cpp +++ b/lib/Transforms/ObjCARC/ObjCARC.cpp @@ -15,6 +15,7 @@ #include "ObjCARC.h" #include "llvm-c/Core.h" +#include "llvm-c/Initialization.h" #include "llvm/InitializePasses.h" #include "llvm/Support/CommandLine.h"