MDString
- Rename member function size(). New name is length().
- Store string beginning and length. Earlier it used to store string end.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76841 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp
index 8393cd4..01b3eb3 100644
--- a/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -758,7 +758,7 @@
       for (unsigned i = 0; i != MDStringLength; ++i)
         String[i] = Record[i];
       Value *V = 
-        Context.getMDString(String.c_str(), String.c_str() + MDStringLength);
+        Context.getMDString(String.c_str(), MDStringLength);
       ValueList.AssignValue(V, NextValueNo++);
       break;
     }
diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp
index 7d745ff..b312420 100644
--- a/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -512,7 +512,7 @@
 
        // Code: [strchar x N]
        const char *StrBegin = MDS->begin();
-       for (unsigned i = 0, e = MDS->size(); i != e; ++i)
+       for (unsigned i = 0, e = MDS->length(); i != e; ++i)
         Record.push_back(StrBegin[i]);
     
        // Emit the finished record.