summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CompilerDriver/Main.cpp
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2009-07-06 10:18:37 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2009-07-06 10:18:37 +0000
commitb89d3db1fda59ab90dd2ceb386e2df6e0843692b (patch)
tree0871decf65c6be56a6954ab81bf604a2e5185461 /llvm/lib/CompilerDriver/Main.cpp
parentf539f0328988b4af7b253de5efb6c1e5b4f774f7 (diff)
downloadbcm5719-llvm-b89d3db1fda59ab90dd2ceb386e2df6e0843692b.tar.gz
bcm5719-llvm-b89d3db1fda59ab90dd2ceb386e2df6e0843692b.zip
Implement _CONFIG macro to allow users to se to configuration settings on the part.
Implement _section macro to allow users to place objects in specific sections. Implement _address macro to allow users to place objects at a particular address. Placing objects at a memory address: crate a unique section name from varname, address, object type and put that section at specified address. Mark this section a full (size = banksize) so that other objects do not compete for it while placing objects to sections in AsmPrinter. llvm-svn: 74822
Diffstat (limited to 'llvm/lib/CompilerDriver/Main.cpp')
-rw-r--r--llvm/lib/CompilerDriver/Main.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/CompilerDriver/Main.cpp b/llvm/lib/CompilerDriver/Main.cpp
index 7d1a3d8fbc4..f4cacb38f18 100644
--- a/llvm/lib/CompilerDriver/Main.cpp
+++ b/llvm/lib/CompilerDriver/Main.cpp
@@ -31,6 +31,17 @@ namespace {
sys::Path getTempDir() {
sys::Path tempDir;
+/////////////////////////////////////////////
+ std::string p = "tmp-objs";
+ tempDir = sys::Path(p);
+ if (!tempDir.exists()) {
+ std::string ErrMsg;
+ if (tempDir.createDirectoryOnDisk(true, &ErrMsg))
+ throw std::runtime_error(ErrMsg);
+ }
+ return tempDir;
+/////////////////////////////////////////////
+
// GCC 4.5-style -save-temps handling.
if (SaveTemps == SaveTempsEnum::Unset) {
tempDir = sys::Path::GetTemporaryDirectory();
OpenPOWER on IntegriCloud