mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-08 23:55:03 +00:00
Use hidden visibility to reduce codesize
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28974 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f8c68f694c
commit
9ef7e06cce
@ -17,6 +17,7 @@
|
|||||||
#include "llvm/Type.h"
|
#include "llvm/Type.h"
|
||||||
#include "llvm/Support/CFG.h"
|
#include "llvm/Support/CFG.h"
|
||||||
#include "llvm/Support/LeakDetector.h"
|
#include "llvm/Support/LeakDetector.h"
|
||||||
|
#include "llvm/Support/Visibility.h"
|
||||||
#include "SymbolTableListTraitsImpl.h"
|
#include "SymbolTableListTraitsImpl.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
@ -24,7 +25,7 @@ using namespace llvm;
|
|||||||
namespace {
|
namespace {
|
||||||
/// DummyInst - An instance of this class is used to mark the end of the
|
/// DummyInst - An instance of this class is used to mark the end of the
|
||||||
/// instruction list. This is not a real instruction.
|
/// instruction list. This is not a real instruction.
|
||||||
struct DummyInst : public Instruction {
|
struct VISIBILITY_HIDDEN DummyInst : public Instruction {
|
||||||
DummyInst() : Instruction(Type::VoidTy, OtherOpsEnd, 0, 0) {
|
DummyInst() : Instruction(Type::VoidTy, OtherOpsEnd, 0, 0) {
|
||||||
// This should not be garbage monitored.
|
// This should not be garbage monitored.
|
||||||
LeakDetector::removeGarbageObject(this);
|
LeakDetector::removeGarbageObject(this);
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/Support/LeakDetector.h"
|
#include "llvm/Support/LeakDetector.h"
|
||||||
|
#include "llvm/Support/Visibility.h"
|
||||||
#include "llvm/Value.h"
|
#include "llvm/Value.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <set>
|
#include <set>
|
||||||
@ -19,17 +20,17 @@ using namespace llvm;
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
template <class T>
|
template <class T>
|
||||||
struct PrinterTrait {
|
struct VISIBILITY_HIDDEN PrinterTrait {
|
||||||
static void print(const T* P) { std::cerr << P; }
|
static void print(const T* P) { std::cerr << P; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
struct PrinterTrait<Value> {
|
struct VISIBILITY_HIDDEN PrinterTrait<Value> {
|
||||||
static void print(const Value* P) { std::cerr << *P; }
|
static void print(const Value* P) { std::cerr << *P; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
struct LeakDetectorImpl {
|
struct VISIBILITY_HIDDEN LeakDetectorImpl {
|
||||||
LeakDetectorImpl(const char* const name) : Cache(0), Name(name) { }
|
LeakDetectorImpl(const char* const name) : Cache(0), Name(name) { }
|
||||||
|
|
||||||
// Because the most common usage pattern, by far, is to add a
|
// Because the most common usage pattern, by far, is to add a
|
||||||
|
Loading…
Reference in New Issue
Block a user