diff --git a/lib/CodeGen/CGVTT.cpp b/lib/CodeGen/CGVTT.cpp
index 5a99059..bee87e2 100644
--- a/lib/CodeGen/CGVTT.cpp
+++ b/lib/CodeGen/CGVTT.cpp
@@ -399,7 +399,8 @@ CodeGenVTables::GenerateVTT(llvm::GlobalVariable::LinkageTypes Linkage,
     GV = new llvm::GlobalVariable(CGM.getModule(), Type, /*isConstant=*/true, 
                                   Linkage, Init, Name);
     CGM.setGlobalVisibility(GV, RD, /*ForDefinition*/ GenerateDefinition);
-    GV->setUnnamedAddr(true);
+    if (GenerateDefinition)
+      GV->setUnnamedAddr(true);
     
     if (OldGV) {
       GV->takeName(OldGV);
diff --git a/lib/CodeGen/CGVTables.cpp b/lib/CodeGen/CGVTables.cpp
index ff65e58..0e43b1a 100644
--- a/lib/CodeGen/CGVTables.cpp
+++ b/lib/CodeGen/CGVTables.cpp
@@ -2982,7 +2982,6 @@ llvm::GlobalVariable *CodeGenVTables::GetAddrOfVTable(const CXXRecordDecl *RD) {
   llvm::GlobalVariable *GV =
     GetGlobalVariable(CGM.getModule(), Name, ArrayType,
                       llvm::GlobalValue::ExternalLinkage);
-  GV->setUnnamedAddr(true);
   return GV;
 }
 
@@ -3074,6 +3073,7 @@ CodeGenVTables::GenerateClassData(llvm::GlobalVariable::LinkageTypes Linkage,
   }
 
   VTable = GetAddrOfVTable(RD);
+  VTable->setUnnamedAddr(true);
   EmitVTableDefinition(VTable, Linkage, RD);
 
   GenerateVTT(Linkage, /*GenerateDefinition=*/true, RD);
diff --git a/test/CodeGenCXX/visibility.cpp b/test/CodeGenCXX/visibility.cpp
index 0e6a2ef..ea524f3 100644
--- a/test/CodeGenCXX/visibility.cpp
+++ b/test/CodeGenCXX/visibility.cpp
@@ -26,8 +26,8 @@
 // CHECK: @_ZGVZN6Test193fooIiEEvvE1a = linkonce_odr global i64
 // CHECK-HIDDEN: @_ZZN6Test193fooIiEEvvE1a = linkonce_odr hidden global
 // CHECK-HIDDEN: @_ZGVZN6Test193fooIiEEvvE1a = linkonce_odr hidden global i64
-// CHECK-HIDDEN: @_ZTTN6Test161AIcEE = external unnamed_addr constant
-// CHECK-HIDDEN: @_ZTVN6Test161AIcEE = external unnamed_addr constant
+// CHECK-HIDDEN: @_ZTTN6Test161AIcEE = external constant
+// CHECK-HIDDEN: @_ZTVN6Test161AIcEE = external constant
 // CHECK: @_ZTVN5Test63fooE = weak_odr hidden unnamed_addr constant 
 
 namespace Test1 {
diff --git a/test/CodeGenCXX/vtable-linkage.cpp b/test/CodeGenCXX/vtable-linkage.cpp
index 752f761..d882902 100644
--- a/test/CodeGenCXX/vtable-linkage.cpp
+++ b/test/CodeGenCXX/vtable-linkage.cpp
@@ -99,7 +99,7 @@ void use_F() {
 
 // B has a key function that is not defined in this translation unit so its vtable
 // has external linkage.
-// CHECK-1: @_ZTV1B = external unnamed_addr constant
+// CHECK-1: @_ZTV1B = external constant
 
 // C has no key function, so its vtable should have weak_odr linkage
 // and hidden visibility (rdar://problem/7523229).
@@ -157,12 +157,12 @@ void use_F() {
 
 // F<int> is an explicit template instantiation declaration without a
 // key function, so its vtable should have external linkage.
-// CHECK-9: @_ZTV1FIiE = external unnamed_addr constant
+// CHECK-9: @_ZTV1FIiE = external constant
 
 // E<int> is an explicit template instantiation declaration. It has a
 // key function that is not instantiated, so we should only reference
 // its vtable, not define it.
-// CHECK-10: @_ZTV1EIiE = external unnamed_addr constant
+// CHECK-10: @_ZTV1EIiE = external constant
 
 // The anonymous struct for e has no linkage, so the vtable should have
 // internal linkage.
