diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-08-24 22:52:01 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-08-24 22:52:01 +0000 |
commit | f20d76d71e64e26c5cac4ee218c4b59787f8ca99 (patch) | |
tree | 7ce9d4f800d764ced3470eea5bdc4c492c524b8a /llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp | |
parent | db0bdd69f54ca455aad69721b71490d81db0a786 (diff) | |
download | bcm5719-llvm-f20d76d71e64e26c5cac4ee218c4b59787f8ca99.tar.gz bcm5719-llvm-f20d76d71e64e26c5cac4ee218c4b59787f8ca99.zip |
Add dependent library support for Stacker. It now inserts "stkr_runtime" as
a dependent library.
llvm-svn: 16040
Diffstat (limited to 'llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp')
-rw-r--r-- | llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp b/llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp index 1ca88da7750..15bf13ee894 100644 --- a/llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp +++ b/llvm/projects/Stacker/lib/compiler/StackerCompiler.cpp @@ -114,6 +114,9 @@ StackerCompiler::compile( // Create the module we'll return TheModule = new Module( CurFilename ); + // Tell the module about our runtime library + TheModule->addLibrary("stkr_runtime"); + // Create a type to represent the stack. This is the same as the LLVM // Assembly type [ 256 x long ] stack_type = ArrayType::get( Type::LongTy, stack_size ); @@ -245,12 +248,13 @@ StackerCompiler::compile( TheInstance = this; // Parse the file. The parser (see StackParser.y) will call back to - // the StackCompiler via the "handle*" methods + // the StackerCompiler via the "handle*" methods Stackerparse(); // Avoid potential illegal use (TheInstance might be on the stack) TheInstance = 0; + } catch (...) { if (F != stdin) fclose(F); // Make sure to close file descriptor throw; // if an exception is thrown |