diff options
Diffstat (limited to 'unittests/Transforms/Utils/ValueMapperTest.cpp')
-rw-r--r-- | unittests/Transforms/Utils/ValueMapperTest.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/unittests/Transforms/Utils/ValueMapperTest.cpp b/unittests/Transforms/Utils/ValueMapperTest.cpp new file mode 100644 index 0000000..137a260 --- /dev/null +++ b/unittests/Transforms/Utils/ValueMapperTest.cpp @@ -0,0 +1,27 @@ +//===- ValueMapper.cpp - Unit tests for ValueMapper -----------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "llvm/IR/LLVMContext.h" +#include "llvm/IR/Metadata.h" +#include "llvm/Transforms/Utils/ValueMapper.h" +#include "gtest/gtest.h" + +using namespace llvm; + +namespace { + +TEST(ValueMapperTest, MapMetadataUnresolved) { + LLVMContext Context; + TempMDTuple T = MDTuple::getTemporary(Context, None); + + ValueToValueMapTy VM; + EXPECT_EQ(T.get(), MapMetadata(T.get(), VM, RF_NoModuleLevelChanges)); +} + +} |