Rename getOrCreateSymbolData to registerSymbol and return void.

Another step in merging MCSymbol and MCSymbolData.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238607 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola
2015-05-29 20:21:02 +00:00
parent 9589ff8949
commit f00654bc0f
11 changed files with 45 additions and 35 deletions

View File

@@ -884,15 +884,13 @@ public:
bool hasSymbolData(const MCSymbol &Symbol) const { return Symbol.hasData(); }
MCSymbolData &getOrCreateSymbolData(const MCSymbol &Symbol,
bool *Created = nullptr) {
void registerSymbol(const MCSymbol &Symbol, bool *Created = nullptr) {
if (Created)
*Created = !hasSymbolData(Symbol);
if (!hasSymbolData(Symbol)) {
Symbol.initializeData();
Symbols.push_back(&Symbol);
}
return Symbol.getData();
}
ArrayRef<std::string> getFileNames() { return FileNames; }

View File

@@ -56,8 +56,8 @@ public:
/// Object streamers require the integrated assembler.
bool isIntegratedAssemblerRequired() const override { return true; }
MCSymbolData &getOrCreateSymbolData(const MCSymbol *Symbol) {
return getAssembler().getOrCreateSymbolData(*Symbol);
void getOrCreateSymbolData(const MCSymbol *Symbol) {
getAssembler().registerSymbol(*Symbol);
}
void EmitFrames(MCAsmBackend *MAB);
void EmitCFISections(bool EH, bool Debug) override;