[llvm] r175264 - Make helpers static. Add missing include so LLVMInitializeObjCARCOpts gets C linkage.

Benjamin Kramer benny.kra at googlemail.com
Fri Feb 15 04:30:38 PST 2013


Author: d0k
Date: Fri Feb 15 06:30:38 2013
New Revision: 175264

URL: http://llvm.org/viewvc/llvm-project?rev=175264&view=rev
Log:
Make helpers static. Add missing include so LLVMInitializeObjCARCOpts gets C linkage.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/ARMException.cpp
    llvm/trunk/lib/DebugInfo/DWARFDebugFrame.cpp
    llvm/trunk/lib/MC/MCObjectStreamer.cpp
    llvm/trunk/lib/Support/SourceMgr.cpp
    llvm/trunk/lib/TableGen/Record.cpp
    llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
    llvm/trunk/lib/Transforms/ObjCARC/ObjCARC.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/ARMException.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/ARMException.cpp?rev=175264&r1=175263&r2=175264&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/ARMException.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/ARMException.cpp Fri Feb 15 06:30:38 2013
@@ -36,7 +36,7 @@
 #include "llvm/Target/TargetRegisterInfo.h"
 using namespace llvm;
 
-cl::opt<bool>
+static cl::opt<bool>
 EnableARMEHABIDescriptors("arm-enable-ehabi-descriptors", cl::Hidden,
   cl::desc("Generate ARM EHABI tables with unwinding descriptors"),
   cl::init(false));

Modified: llvm/trunk/lib/DebugInfo/DWARFDebugFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFDebugFrame.cpp?rev=175264&r1=175263&r2=175264&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARFDebugFrame.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARFDebugFrame.cpp Fri Feb 15 06:30:38 2013
@@ -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() {

Modified: llvm/trunk/lib/MC/MCObjectStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCObjectStreamer.cpp?rev=175264&r1=175263&r2=175264&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCObjectStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCObjectStreamer.cpp Fri Feb 15 06:30:38 2013
@@ -224,7 +224,7 @@ void MCObjectStreamer::EmitInstToFragmen
   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) {

Modified: llvm/trunk/lib/Support/SourceMgr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/SourceMgr.cpp?rev=175264&r1=175263&r2=175264&view=diff
==============================================================================
--- llvm/trunk/lib/Support/SourceMgr.cpp (original)
+++ llvm/trunk/lib/Support/SourceMgr.cpp Fri Feb 15 06:30:38 2013
@@ -248,8 +248,8 @@ SMDiagnostic::SMDiagnostic(const SourceM
   std::sort(FixIts.begin(), FixIts.end());
 }
 
-void buildFixItLine(std::string &CaretLine, std::string &FixItLine,
-                    ArrayRef<SMFixIt> FixIts, ArrayRef<char> SourceLine) {
+static void buildFixItLine(std::string &CaretLine, std::string &FixItLine,
+                           ArrayRef<SMFixIt> FixIts, ArrayRef<char> SourceLine){
   if (FixIts.empty())
     return;
 

Modified: llvm/trunk/lib/TableGen/Record.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/TableGen/Record.cpp?rev=175264&r1=175263&r2=175264&view=diff
==============================================================================
--- llvm/trunk/lib/TableGen/Record.cpp (original)
+++ llvm/trunk/lib/TableGen/Record.cpp Fri Feb 15 06:30:38 2013
@@ -1525,11 +1525,9 @@ Init *FieldInit::resolveReferences(Recor
   return const_cast<FieldInit *>(this);
 }
 
-void ProfileDagInit(FoldingSetNodeID &ID,
-                    Init *V,
-                    const std::string &VN,
-                    ArrayRef<Init *> ArgRange,
-                    ArrayRef<std::string> NameRange) {
+static void ProfileDagInit(FoldingSetNodeID &ID, Init *V, const std::string &VN,
+                           ArrayRef<Init *> ArgRange,
+                           ArrayRef<std::string> NameRange) {
   ID.AddPointer(V);
   ID.AddString(VN);
 

Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp?rev=175264&r1=175263&r2=175264&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Fri Feb 15 06:30:38 2013
@@ -50,7 +50,7 @@ ForceStackAlign("force-align-stack",
                            " needed for the function."),
                  cl::init(false), cl::Hidden);
 
-cl::opt<bool>
+static cl::opt<bool>
 EnableBasePointer("x86-use-base-pointer", cl::Hidden, cl::init(true),
           cl::desc("Enable use of a base pointer for complex stack frames"));
 

Modified: llvm/trunk/lib/Transforms/ObjCARC/ObjCARC.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/ObjCARC/ObjCARC.cpp?rev=175264&r1=175263&r2=175264&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/ObjCARC/ObjCARC.cpp (original)
+++ llvm/trunk/lib/Transforms/ObjCARC/ObjCARC.cpp Fri Feb 15 06:30:38 2013
@@ -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"
 





More information about the llvm-commits mailing list