aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-02-15 12:30:38 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-02-15 12:30:38 +0000
commit74b3c8da4800c7e8ba8f019879db29738ecc5f74 (patch)
treeb3186368adae9e3b7cbfea1a3d9d95a2a45c059d
parent1e8839302b70d77de63844332bdee9ce7d06f2c9 (diff)
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
-rw-r--r--lib/CodeGen/AsmPrinter/ARMException.cpp2
-rw-r--r--lib/DebugInfo/DWARFDebugFrame.cpp3
-rw-r--r--lib/MC/MCObjectStreamer.cpp2
-rw-r--r--lib/Support/SourceMgr.cpp4
-rw-r--r--lib/TableGen/Record.cpp8
-rw-r--r--lib/Target/X86/X86RegisterInfo.cpp2
-rw-r--r--lib/Transforms/ObjCARC/ObjCARC.cpp1
7 files changed, 11 insertions, 11 deletions
diff --git a/lib/CodeGen/AsmPrinter/ARMException.cpp b/lib/CodeGen/AsmPrinter/ARMException.cpp
index 93100691c8..188047d94f 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<bool>
+static cl::opt<bool>
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 9da304d31f..69e3a3a62f 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 5aa4b40a6d..fe435061eb 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 fa82265f38..fac3cad5cc 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<SMFixIt> FixIts, ArrayRef<char> SourceLine) {
+static void buildFixItLine(std::string &CaretLine, std::string &FixItLine,
+ ArrayRef<SMFixIt> FixIts, ArrayRef<char> SourceLine){
if (FixIts.empty())
return;
diff --git a/lib/TableGen/Record.cpp b/lib/TableGen/Record.cpp
index fcee93aac4..9ad20532d7 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<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);
diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp
index 02da140916..401eefb16a 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<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"));
diff --git a/lib/Transforms/ObjCARC/ObjCARC.cpp b/lib/Transforms/ObjCARC/ObjCARC.cpp
index f798063bb3..53a31b0de1 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"