[CommandInterpreter] Refactor SourceInitFile

Authored by JDevlieghere on May 17 2019, 3:53 PM.

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.
This commit no longer exists in the repository. It may have been part of a branch which was deleted.This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.


[CommandInterpreter] Refactor SourceInitFile

I was looking at the current implementation of SourceInitFile and there
were a few things that made this function hard to read:

  • The code to find the ~/.lldbinit file is duplicated across the cwd and non-cwd branch.
  • The ./.lldbinit is once computed by resolving .lldbinit and once by resolving ./.lldbinit.
  • It wasn't clear to me what happened when you're sourcing the .lldbinit file in the current working directory. Apparently we do nothing when we property to control that is set to warn (makes sense) and we don't care when the property is set to true (debatable).
  • There were at least two branches where the status of the CommandReturnObject were not set.

This patch attempts to simplify that code.

Differential revision: https://reviews.llvm.org/D61994

llvm-svn: 361080


sidorovdMay 24 2019, 5:43 AM
Differential Revision
D61994: [CommandInterpreter] Refactor SourceInitFile

Commit No Longer Exists

This commit no longer exists in the repository.