[llvm] r358250 - Move a couple of optional references to just optional to make the

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 11 20:49:14 PDT 2019


Author: echristo
Date: Thu Apr 11 20:49:13 2019
New Revision: 358250

URL: http://llvm.org/viewvc/llvm-project?rev=358250&view=rev
Log:
Move a couple of optional references to just optional to make the
forwarding APIs look similar.

Modified:
    llvm/trunk/include/llvm/MC/MCDwarf.h
    llvm/trunk/lib/MC/MCDwarf.cpp

Modified: llvm/trunk/include/llvm/MC/MCDwarf.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCDwarf.h?rev=358250&r1=358249&r2=358250&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCDwarf.h (original)
+++ llvm/trunk/include/llvm/MC/MCDwarf.h Thu Apr 11 20:49:13 2019
@@ -224,7 +224,7 @@ public:
 
   Expected<unsigned> tryGetFile(StringRef &Directory, StringRef &FileName,
                                 Optional<MD5::MD5Result> Checksum,
-                                Optional<StringRef> &Source,
+                                Optional<StringRef> Source,
                                 unsigned FileNumber = 0);
   std::pair<MCSymbol *, MCSymbol *>
   Emit(MCStreamer *MCOS, MCDwarfLineTableParams Params,
@@ -293,7 +293,7 @@ public:
                                 Optional<StringRef> Source,
                                 unsigned FileNumber = 0);
   unsigned getFile(StringRef &Directory, StringRef &FileName,
-                   Optional<MD5::MD5Result> Checksum, Optional<StringRef> &Source,
+                   Optional<MD5::MD5Result> Checksum, Optional<StringRef> Source,
                    unsigned FileNumber = 0) {
     return cantFail(tryGetFile(Directory, FileName, Checksum, Source,
                                FileNumber));

Modified: llvm/trunk/lib/MC/MCDwarf.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCDwarf.cpp?rev=358250&r1=358249&r2=358250&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCDwarf.cpp (original)
+++ llvm/trunk/lib/MC/MCDwarf.cpp Thu Apr 11 20:49:13 2019
@@ -546,7 +546,7 @@ Expected<unsigned>
 MCDwarfLineTableHeader::tryGetFile(StringRef &Directory,
                                    StringRef &FileName,
                                    Optional<MD5::MD5Result> Checksum,
-                                   Optional<StringRef> &Source,
+                                   Optional<StringRef> Source,
                                    unsigned FileNumber) {
   if (Directory == CompilationDir)
     Directory = "";




More information about the llvm-commits mailing list