[llvm] r217077 - Make some helpers static or move into the llvm namespace.
Benjamin Kramer
benny.kra at googlemail.com
Wed Sep 3 14:04:12 PDT 2014
Author: d0k
Date: Wed Sep 3 16:04:12 2014
New Revision: 217077
URL: http://llvm.org/viewvc/llvm-project?rev=217077&view=rev
Log:
Make some helpers static or move into the llvm namespace.
Modified:
llvm/trunk/lib/ProfileData/CoverageMappingWriter.cpp
llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp
llvm/trunk/lib/Target/Mips/MipsOptionRecord.h
llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp
Modified: llvm/trunk/lib/ProfileData/CoverageMappingWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ProfileData/CoverageMappingWriter.cpp?rev=217077&r1=217076&r2=217077&view=diff
==============================================================================
--- llvm/trunk/lib/ProfileData/CoverageMappingWriter.cpp (original)
+++ llvm/trunk/lib/ProfileData/CoverageMappingWriter.cpp Wed Sep 3 16:04:12 2014
@@ -103,7 +103,8 @@ static unsigned countFileIDs(ArrayRef<Co
/// A counter with kind Counter::Expression and an expression
/// with kind CounterExpression::Add
/// Remaining bits - Counter/Expression ID.
-unsigned encodeCounter(ArrayRef<CounterExpression> Expressions, Counter C) {
+static unsigned encodeCounter(ArrayRef<CounterExpression> Expressions,
+ Counter C) {
unsigned Tag = unsigned(C.getKind());
if (C.isExpression())
Tag += Expressions[C.getExpressionID()].Kind;
Modified: llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp?rev=217077&r1=217076&r2=217077&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp Wed Sep 3 16:04:12 2014
@@ -9,6 +9,7 @@
#include "MipsELFStreamer.h"
#include "llvm/MC/MCInst.h"
+using namespace llvm;
void MipsELFStreamer::EmitInstruction(const MCInst &Inst,
const MCSubtargetInfo &STI) {
Modified: llvm/trunk/lib/Target/Mips/MipsOptionRecord.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsOptionRecord.h?rev=217077&r1=217076&r2=217077&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsOptionRecord.h (original)
+++ llvm/trunk/lib/Target/Mips/MipsOptionRecord.h Wed Sep 3 16:04:12 2014
@@ -24,12 +24,9 @@
#include "llvm/MC/MCContext.h"
#include "llvm/MC/MCRegisterInfo.h"
-using namespace llvm;
-
namespace llvm {
class MipsELFStreamer;
class MCSubtargetInfo;
-}
class MipsOptionRecord {
public:
@@ -58,7 +55,7 @@ public:
}
~MipsRegInfoRecord() {}
- void EmitMipsOptionRecord();
+ void EmitMipsOptionRecord() override;
void SetPhysRegUsed(unsigned Reg, const MCRegisterInfo *MCRegInfo);
private:
@@ -77,4 +74,5 @@ private:
uint32_t ri_cprmask[4];
int64_t ri_gp_value;
};
+} // namespace llvm
#endif
Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp?rev=217077&r1=217076&r2=217077&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopUnrollPass.cpp Wed Sep 3 16:04:12 2014
@@ -221,7 +221,7 @@ static unsigned ApproximateLoopSize(cons
// Returns the loop hint metadata node with the given name (for example,
// "llvm.loop.unroll.count"). If no such metadata node exists, then nullptr is
// returned.
-const MDNode *GetUnrollMetadata(const Loop *L, StringRef Name) {
+static const MDNode *GetUnrollMetadata(const Loop *L, StringRef Name) {
MDNode *LoopID = L->getLoopID();
if (!LoopID)
return nullptr;
More information about the llvm-commits
mailing list