summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Transforms/DebugIR
diff options
context:
space:
mode:
authorDaniel Malea <daniel.malea@intel.com>2013-06-28 22:17:57 +0000
committerDaniel Malea <daniel.malea@intel.com>2013-06-28 22:17:57 +0000
commitbfd578dc18e5dbc1ea2af6ada4e1787faf52bff8 (patch)
tree4eb6f5a6f56f354a26f01373d17982414a265bf6 /llvm/unittests/Transforms/DebugIR
parentba2778f4badee60a079ee82059a50239f27f3092 (diff)
downloadbcm5719-llvm-bfd578dc18e5dbc1ea2af6ada4e1787faf52bff8.tar.gz
bcm5719-llvm-bfd578dc18e5dbc1ea2af6ada4e1787faf52bff8.zip
Replace UNIXy path with os-independent one in DebugIR unit test
- should resolve windows buildbot failure llvm-svn: 185232
Diffstat (limited to 'llvm/unittests/Transforms/DebugIR')
-rw-r--r--llvm/unittests/Transforms/DebugIR/DebugIR.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/llvm/unittests/Transforms/DebugIR/DebugIR.cpp b/llvm/unittests/Transforms/DebugIR/DebugIR.cpp
index cf81e7a728d..7d213fd0567 100644
--- a/llvm/unittests/Transforms/DebugIR/DebugIR.cpp
+++ b/llvm/unittests/Transforms/DebugIR/DebugIR.cpp
@@ -96,14 +96,15 @@ protected:
// Test empty named Module that is not supposed to be output to disk.
TEST_F(TestDebugIR, EmptyNamedModuleNoWrite) {
- string name = "/mock/path/to/empty_module.ll";
- M.reset(createEmptyModule(name));
- D.reset(static_cast<DebugIR *>(llvm::createDebugIRPass()));
- string Path;
- D->runOnModule(*M, Path);
+ string Dir = "MadeUpDirectory";
+ string File = "empty_module.ll";
+ string Path(getPath(Dir, File));
- // verify DebugIR was able to correctly parse the file name from module ID
- ASSERT_EQ(Path, name);
+ M.reset(createEmptyModule(Path));
+
+ // constructing DebugIR with no args should not result in any file generated.
+ D.reset(static_cast<DebugIR *>(llvm::createDebugIRPass()));
+ D->runOnModule(*M);
// verify DebugIR did not generate a file
ASSERT_FALSE(removeIfExists(Path)) << "Unexpected file " << Path;
OpenPOWER on IntegriCloud