summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2010-02-02 00:04:46 +0000
committerSean Callanan <scallanan@apple.com>2010-02-02 00:04:46 +0000
commit37ad4661b4737e70c9f6a8a2037b4a9731add351 (patch)
tree5eba205bed89875390344ce636ecf7378e5678e8 /tools
parent39bdc78e6fcc2a152c6143952c23fba5db983227 (diff)
downloadllvm-37ad4661b4737e70c9f6a8a2037b4a9731add351.tar.gz
llvm-37ad4661b4737e70c9f6a8a2037b4a9731add351.tar.bz2
llvm-37ad4661b4737e70c9f6a8a2037b4a9731add351.tar.xz
Changed to Chris Lattner's suggested approach, which
merely stubs out the blocks-based disassembly functions if the library wasn't built with blocks, which allows a constant .exports file and also properly deals with situations in which the compiler used to build a client is different from the compiler used to build the library. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95034 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/ed/EDMain.cpp14
-rw-r--r--tools/ed/EnhancedDisassembly.exports (renamed from tools/ed/EnhancedDisassembly.exports.blocks)0
-rw-r--r--tools/ed/EnhancedDisassembly.exports.noblocks28
-rw-r--r--tools/ed/Makefile16
4 files changed, 16 insertions, 42 deletions
diff --git a/tools/ed/EDMain.cpp b/tools/ed/EDMain.cpp
index 2ac6c79296..c2c179693e 100644
--- a/tools/ed/EDMain.cpp
+++ b/tools/ed/EDMain.cpp
@@ -248,4 +248,18 @@ int EDBlockVisitTokens(EDInstRef inst,
return inst->visitTokens(visitor);
}
+#else
+
+extern "C" unsigned int EDBlockCreateInsts() {
+ return 0;
+}
+
+extern "C" int EDBlockEvaluateOperand() {
+ return -1;
+}
+
+extern "C" int EDBlockVisitTokens() {
+ return -1;
+}
+
#endif
diff --git a/tools/ed/EnhancedDisassembly.exports.blocks b/tools/ed/EnhancedDisassembly.exports
index 63738e5366..63738e5366 100644
--- a/tools/ed/EnhancedDisassembly.exports.blocks
+++ b/tools/ed/EnhancedDisassembly.exports
diff --git a/tools/ed/EnhancedDisassembly.exports.noblocks b/tools/ed/EnhancedDisassembly.exports.noblocks
deleted file mode 100644
index 5852e7f4b2..0000000000
--- a/tools/ed/EnhancedDisassembly.exports.noblocks
+++ /dev/null
@@ -1,28 +0,0 @@
-_EDGetDisassembler
-_EDGetRegisterName
-_EDRegisterIsStackPointer
-_EDRegisterIsProgramCounter
-_EDCreateInsts
-_EDReleaseInst
-_EDInstByteSize
-_EDGetInstString
-_EDInstIsBranch
-_EDInstIsMove
-_EDBranchTargetID
-_EDMoveSourceID
-_EDMoveTargetID
-_EDNumTokens
-_EDGetToken
-_EDGetTokenString
-_EDOperandIndexForToken
-_EDTokenIsWhitespace
-_EDTokenIsPunctuation
-_EDTokenIsOpcode
-_EDTokenIsLiteral
-_EDTokenIsRegister
-_EDTokenIsNegativeLiteral
-_EDLiteralTokenAbsoluteValue
-_EDRegisterTokenValue
-_EDNumOperands
-_EDGetOperand
-_EDEvaluateOperand
diff --git a/tools/ed/Makefile b/tools/ed/Makefile
index 23970a9cae..a3c5879668 100644
--- a/tools/ed/Makefile
+++ b/tools/ed/Makefile
@@ -10,7 +10,7 @@
LEVEL = ../..
LIBRARYNAME = EnhancedDisassembly
-BUILT_SOURCES = EDInfo.inc EnhancedDisassembly.exports
+BUILT_SOURCES = EDInfo.inc
# Include this here so we can get the configuration of the targets
# that have been configured for construction. We have to do this
@@ -34,7 +34,7 @@ ifeq ($(HOST_OS),Darwin)
# extra options to override libtool defaults
LLVMLibsOptions := $(LLVMLibsOptions) \
-avoid-version \
- -Wl,-exported_symbols_list -Wl,EnhancedDisassembly.exports \
+ -Wl,-exported_symbols_list -Wl,$(PROJ_SRC_DIR)/EnhancedDisassembly.exports \
-Wl,-dead_strip \
-Wl,-seg1addr -Wl,0xE0000000
@@ -51,17 +51,5 @@ EDInfo.inc: $(TBLGEN)
$(Echo) "Building semantic information header"
$(Verb) $(TableGen) -o $(call SYSPATH, $@) -gen-enhanced-disassembly-header /dev/null
-EnhancedDisassembly.exports: EnhancedDisassembly.exports.noblocks EnhancedDisassembly.exports.blocks
- $(Echo) "Copying exports file"
-ifeq ($(HOST_OS),Darwin)
- $(Verb) if [ $(DARWIN_VERS) -ge 10 ] ; \
- then $(CP) -f $(PROJ_SRC_DIR)/EnhancedDisassembly.exports.blocks EnhancedDisassembly.exports ; \
- else $(CP) -f $(PROJ_SRC_DIR)/EnhancedDisassembly.exports.noblocks EnhancedDisassembly.exports ; \
- fi
-else
- $(Verb) $(CP) -f $(PROJ_SRC_DIR)/EnhancedDisassembly.exports.noblocks EnhancedDisassembly.exports
-endif
-
clean::
-$(Verb) $(RM) -f EDInfo.inc
- -$(Verb) $(RM) -f EnhancedDisassembly.exports