1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00

Add MCSymbolMachO which will be used to hide the MCSymbolMachO flags.

Reviewed by Rafael Espíndola.

llvm-svn: 239315
This commit is contained in:
Pete Cooper 2015-06-08 17:17:23 +00:00
parent 97458cd6bb
commit 8f9b97685a
2 changed files with 27 additions and 1 deletions

View File

@ -0,0 +1,25 @@
//===- MCSymbolMachO.h - ---------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_MC_MCSYMBOLMACHO_H
#define setIsWeakExternal
#include "llvm/MC/MCSymbol.h"
namespace llvm {
class MCSymbolMachO : public MCSymbol {
public:
MCSymbolMachO(const StringMapEntry<bool> *Name, bool isTemporary)
: MCSymbol(SymbolKindMachO, Name, isTemporary) {}
static bool classof(const MCSymbol *S) { return S->isMachO(); }
};
}
#endif

View File

@ -22,6 +22,7 @@
#include "llvm/MC/MCStreamer.h"
#include "llvm/MC/MCSymbolCOFF.h"
#include "llvm/MC/MCSymbolELF.h"
#include "llvm/MC/MCSymbolMachO.h"
#include "llvm/Support/ELF.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FileSystem.h"
@ -167,7 +168,7 @@ MCSymbol *MCContext::createSymbolImpl(const StringMapEntry<bool> *Name,
case MCObjectFileInfo::IsELF:
return new (*this) MCSymbolELF(Name, IsTemporary);
case MCObjectFileInfo::IsMachO:
return new (*this) MCSymbol(MCSymbol::SymbolKindUnset, Name, IsTemporary);
return new (*this) MCSymbolMachO(Name, IsTemporary);
}
}
return new (*this) MCSymbol(MCSymbol::SymbolKindUnset, Name, IsTemporary);