ValueMapperTest.cpp revision 4c5e43da7792f75567b693105cc53e3f1992ad98
1//===- ValueMapper.cpp - Unit tests for ValueMapper -----------------------===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#include "llvm/IR/LLVMContext.h"
11#include "llvm/IR/Metadata.h"
12#include "llvm/Transforms/Utils/ValueMapper.h"
13#include "gtest/gtest.h"
14
15using namespace llvm;
16
17namespace {
18
19TEST(ValueMapperTest, MapMetadataUnresolved) {
20  LLVMContext Context;
21  TempMDTuple T = MDTuple::getTemporary(Context, None);
22
23  ValueToValueMapTy VM;
24  EXPECT_EQ(T.get(), MapMetadata(T.get(), VM, RF_NoModuleLevelChanges));
25}
26
27}
28