Driver/Darwin: Make the compilation object available in AddLinkArgs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113549 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 2ad98ea..9c5371f 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -2188,7 +2188,8 @@
CmdArgs.push_back("-force_cpusubtype_ALL");
}
-void darwin::Link::AddLinkArgs(const ArgList &Args,
+void darwin::Link::AddLinkArgs(Compilation &C,
+ const ArgList &Args,
ArgStringList &CmdArgs) const {
const Driver &D = getToolChain().getDriver();
@@ -2378,7 +2379,7 @@
// I'm not sure why this particular decomposition exists in gcc, but
// we follow suite for ease of comparison.
- AddLinkArgs(Args, CmdArgs);
+ AddLinkArgs(C, Args, CmdArgs);
Args.AddAllArgs(CmdArgs, options::OPT_d_Flag);
Args.AddAllArgs(CmdArgs, options::OPT_s);
diff --git a/lib/Driver/Tools.h b/lib/Driver/Tools.h
index b5defa4..63faf91 100644
--- a/lib/Driver/Tools.h
+++ b/lib/Driver/Tools.h
@@ -232,7 +232,8 @@
};
class LLVM_LIBRARY_VISIBILITY Link : public DarwinTool {
- void AddLinkArgs(const ArgList &Args, ArgStringList &CmdArgs) const;
+ void AddLinkArgs(Compilation &C, const ArgList &Args,
+ ArgStringList &CmdArgs) const;
public:
Link(const ToolChain &TC) : DarwinTool("darwin::Link", "linker", TC) {}